package cn.wolfcode.crm.Service;


import cn.wolfcode.crm.domain.Permission;
import cn.wolfcode.crm.domain.Role;
import cn.wolfcode.crm.query.RoleQuery;
import com.github.pagehelper.PageInfo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface IRoleService {
    int deleteByPrimaryKey(Long id);

    int insert(Role record);

    Role selectByPrimaryKey(Long id);
    Role selectOne(Long id);

    List<Role> selectAll();

    int updateByPrimaryKey(Role record);

    PageInfo<Role> queryForList(RoleQuery qo);

    void insertRelation(@Param("roleId") Long roleId, @Param("permissionId") Long permissionId);

    List<Permission> getPresentPermission(Long id);

    void deleteRelation(Long id);

    void insertPersonRelation(Long deptId, Long role_id);

    void deletePersonRelation(Long id);
}
